<!--
 * @Author: your name
 * @Date: 2020-10-10 17:29:41
 * @LastEditTime: 2020-10-10 17:49:34
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue_plugins\src\views\video\Dplayer.vue
-->
<template>
<div class="container">
    <van-nav-bar
        title="视频播放器dplayer"
        :border="false"
        fixed
        left-arrow
        @click-left="$router.go('-1')"
    />
    <div ref="dplayer"></div>
</div>
</template>

<script>
// import 'dplayer/dist/DPlayer.min.css';
import DPlayer from 'dplayer';
export default {
    data(){
        return{

        }
    },
    mounted(){
        const dp = new DPlayer({
            container:this.$refs.dplayer,//	播放器容器元素
            autoplay:false,//
            loop:false,//
            preload:'auto',//预加载，可选值: 'none', 'metadata', 'auto'
            video:{
                url:'http://static.smartisanos.cn/common/video/t1-ui.mp4',//地址
                pic:'',//封面
            }
        })
    },
    methods:{

    }
}
</script>

<style lang="less" scoped>

</style>